package cn.arraybq;


import java.util.concurrent.ArrayBlockingQueue;


public class TestDemo {
	
	public static void main(String[] args)throws Exception{
		
	final  ArrayBlockingQueue<Integer> queue=new ArrayBlockingQueue<Integer>(10);	
	   
	System.out.println("now get");
	  System.out.println(queue.take()+"get method"); 
	  System.out.println("now put");
	queue.put(12);
	
	
	
	 /**new Thread(new Runnable(){
		public void run(){
			
			try {
				System.out.println(queue.take());
				
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} 
	 }).start();
	 Thread.sleep(3000);
	 new Thread(new Runnable(){
			public void run(){
				
				try {
					queue.put(12);
					
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			} 
		 }).start();;
	 
	   **/
	 
	 
	}
}
